<?php include '../../common/header.html.php';?>
<div id="sub_block1">
  <!--Content Block Starts -->
  <div id="content_block">
    <?php include '../../common/leftblock.html.php';?>
    <!--Right Block Starts -->
    <div id="right_block"> 
    <?php if ($doneflag ){ echo "<div id='doneflag'>{$doneflag}</div>";} ?>
    <h1>客户留言 <a href="#addMsg"><img src="/images/msg_add.gif" alt="添加留言" width="96" height="31" border="0" /></a>	</h1>
    <?php 
    foreach ($data as $v){
    	echo "<div class=\"message\">";
    		echo "<h3>#{$v->msg_id}楼 , {$v->msg_author}</h3>";
    		if($v->msg_company) echo $v->msg_company;
    		echo " , Tel:", substr($v->msg_tel,0,5).'****';
    		echo "<div class=\"msg_content\">";
    		echo $v->msg_content;
    		echo "</div>";
    		
    		if($v->msg_reply){
    			echo "<div class=\"msg_reply\"> {$v->msg_reply} </div>";
    		}
    		
    	echo "</div>";
    }
    ?>
    <?php 
    
    echo $pager;
    ?>
    
    <div style="border-bottom:1px dotted #ccc"></div>
    <a id="addMsg"></a>
    <form id="form1" name="form1" method="post" action="<?php echo helper::createLink("message", "index") ?>" onsubmit="return chkmsg()">
  
  <table width="600" class="msg_show">
    <tr>
      <td width="139">留言人：</td>
      <td width="449"><input name="msg_author" type="text" id="msg_author" maxlength="50" /></td>
    </tr>
    <tr>
      <td>公司：</td>
      <td><input name="msg_company" type="text" id="msg_company" /></td>
    </tr>
    <tr>
      <td>联系电话：</td>
      <td><input name="msg_tel" type="text" id="msg_tel" size="20" maxlength="20" /></td>
    </tr>
    <tr>
      <td>E-mail：</td>
      <td><input name="msg_email" type="text" id="msg_email" maxlength="100" /></td>
    </tr>
    <tr>
      <td>标题：</td>
      <td><input name="msg_title" type="text" id="msg_title" size="50" maxlength="50" />
      *</td>
    </tr>
    <tr>
      <td>内容：</td>
      <td><textarea name="msg_content" cols="50" rows="8" id="msg_content"></textarea>
      *</td>
    </tr>
    <tr>
      <td>验证码：</td>
      <td><input name="yzm" type="text" id="yzm" size="5" maxlength="5" /> 
      <img src="<?php echo helper::createLink('index', 'yzm') ?>" style="float:none; cursor:pointer" id="img-yzm" title="点击刷新" />  
      </td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
        <input type="submit" name="Submit" value=" 提交 "  class="btn-submit"/>
        <input type="reset" name="Submit2" value=" 重置 "  class="btn-submit"/> 
      </div></td>
    </tr>
  </table>
</form>
    
    </div>
    <!--Right Block Ends -->
  </div>
  <!--Content Block Ends -->
</div>
<!--sub1 Block Ends -->
<?php include '../../common/footer.html.php';?>